package com.hust.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * price
 * @author 
 */
public class Price implements Serializable {
    /**
     * 价格id
     */
    private Integer pId;

    /**
     * 商品id
     */
    private Long cId;

    /**
     * 价格日期
     */
    private Date cDate;

    /**
     * 商品价格
     */
    private String cPrice;

    private static final long serialVersionUID = 1L;

    public Integer getpId() {
        return pId;
    }

    public void setpId(Integer pId) {
        this.pId = pId;
    }

    public Long getcId() {
        return cId;
    }

    public void setcId(Long cId) {
        this.cId = cId;
    }

    public Date getcDate() {
        return cDate;
    }

    public void setcDate(Date cDate) {
        this.cDate = cDate;
    }

    public String getcPrice() {
        return cPrice;
    }

    public void setcPrice(String cPrice) {
        this.cPrice = cPrice;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Price other = (Price) that;
        return (this.getpId() == null ? other.getpId() == null : this.getpId().equals(other.getpId()))
            && (this.getcId() == null ? other.getcId() == null : this.getcId().equals(other.getcId()))
            && (this.getcDate() == null ? other.getcDate() == null : this.getcDate().equals(other.getcDate()))
            && (this.getcPrice() == null ? other.getcPrice() == null : this.getcPrice().equals(other.getcPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getpId() == null) ? 0 : getpId().hashCode());
        result = prime * result + ((getcId() == null) ? 0 : getcId().hashCode());
        result = prime * result + ((getcDate() == null) ? 0 : getcDate().hashCode());
        result = prime * result + ((getcPrice() == null) ? 0 : getcPrice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", pId=").append(pId);
        sb.append(", cId=").append(cId);
        sb.append(", cDate=").append(cDate);
        sb.append(", cPrice=").append(cPrice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}